1. Technical Field
The present invention relates generally to communication protocols between a host computer and an input/output (I/O) adapter. More specifically, the present invention provides an implementation for virtualizing resources on a physical I/O adapter. In particular, the present invention provides a mechanism by which a single physical I/O adapter, such as a PCI, PCI-X, or PCI-E adapter, can validate that the set of direct memory access (DMA) addresses referenced by an incoming I/O transaction that was initiated through a memory mapped I/O (MMIO) operation are associated with a virtual adapter or virtual resource that is referenced by the incoming memory mapped I/O operation.
2. Description of Related Art
Virtualization is the creation of substitutes for real resources. The substitutes have the same functions and external interfaces as their real counterparts, but differ in attributes such as size, performance, and cost. These substitutes are virtual resources and their users are usually unaware of the substitute's existence. Servers have used two basic approaches to virtualize system resources: Partitioning and logical partition (LPAR) managers. Partitioning creates virtual servers as fractions of a physical server's resources, typically in coarse (e.g., physical) allocation units (e.g., a whole processor, along with its associated memory and I/O adapters). LPAR managers are software or firmware components that can virtualize all server resources with fine granularity (e.g., in small fractions that of a single physical resource).
In conventional systems, servers that support virtualization had two general options for handling I/O. The first option was to not allow a single physical I/O adapter to be shared between virtual servers. The second option was to add functionality into the LPAR manager, or another suitable intermediary, that provides the isolation necessary to permit multiple operating systems to share a single physical adapter.
The first option has several problems. One significant problem is that expensive adapters cannot be shared between virtual servers. If a virtual server only needs to use a fraction of an expensive adapter, an entire adapter would be dedicated to the server. As the number of virtual servers on the physical server increases, this leads to under-utilization of the adapters and more importantly a more expensive solution, because each virtual server needs a physical adapter dedicated to it. For physical servers that support many virtual servers, another significant problem with this approach is that it requires many adapter slots and the accompanying hardware (e.g., chips, connectors, cables, and the like) required to attach those adapters to the physical server.
Though the second option provides a mechanism for sharing adapters between virtual servers, that mechanism must be invoked and executed on every I/O transaction. The invocation and execution of the sharing mechanism by the LPAR manager or other intermediary on every I/O transaction degrades performance. It also leads to a more expensive solution, because the customer must purchase more hardware either to make up for the cycles used to perform the sharing mechanism or, if the sharing mechanism is offloaded to an intermediary, for the intermediary hardware.
It would be advantageous to have an improved method, apparatus, and computer instructions that allows a single physical I/O adapter, such as a PCI, PCI-X, or PCI-E adapter, to validate that the set of DMA addresses referenced by an incoming I/O transaction that was initiated through a memory mapped I/O operation, are associated with the virtual adapter or virtual resource that is referenced by the incoming memory mapped I/O operation. It would also be advantageous to have the mechanism apply for adapters that support a MMIO interface, such as Ethernet NICs (Network Interface Controllers), FC (Fibre Channel) HBAs (Host Bus Adapters), pSCSI (parallel SCSI) HBAs, InfiniBand, TCP/IP Offload Engines, RDMA (Remote Direct Memory Access) enabled NICs (Network Interface Controllers), iSCSI adapters, iSER (iSCSI Extensions for RDMA) adapters, and the like.